﻿using Abp.Application.Services;
using Choucius.Boilerplate9.DtoBase;
using System.Collections.Generic;

namespace Choucius.Boilerplate9.UR5208
{
    /// <summary>
    /// UR5208 RFID读写器
    /// </summary>
    public interface IUR5208AppService : IApplicationService
    {
        /// <summary>
        /// 调用一次UR5208读写器读取一批RFID标签，并保存标签信息
        /// </summary>
        /// <param name="ip">读写器IP地址</param>
        /// <param name="port">读写器端口（UR5208的端口是6000）</param>
        /// <returns>读取的数据</returns>
        List<string> UR5208Read(string ip, int port);

        /// <summary>
        /// 调用一次UR5208读写器写入一张RFID标签
        /// </summary>
        /// <param name="ip">读写器IP地址</param>
        /// <param name="port">读写器端口（UR5208的端口是6000）</param>
        /// <param name="data">写入ECP区的数据（16进制数）</param>
        /// <returns>返回状态信息</returns>
        ResponseDto UR5208Write(string ip, int port, string data);

        ResponseDto UR5208ReadAndWrite(int workStationId);
    }
}
